package nix.spring.test;

import javax.annotation.Resource;

import nix.spring.domain.Student;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

@RunWith(SpringJUnit4ClassRunner.class)// 自动创建容器
@ContextConfiguration("classpath:applicationContext.xml")// 指定配置文件
public class Demo1 {

	@Resource(name="student")
	private Student stu;
	
	@Test
	public void fun1() {
		System.out.println(stu);
	}
}
